home *** CD-ROM | disk | FTP | other *** search
/ ShareWare OnLine 2 / ShareWare OnLine Volume 2 (CMS Software)(1993).iso / util2 / zdir18.zip / ZDIR18.DOC < prev   
Text File  |  1993-01-27  |  11KB  |  223 lines

  1. ZDIR.COM        - A ZIP utility from Toad Hall                  27 Jan 93
  2.                   v1.8
  3.  
  4. Usage:  ZDIR [-v] filename[.ZIP] [member.typ] [-v | -m] [>output]
  5.         where   [-v]            verbose display (/V works also)
  6.                 [-m]            monosyllabic display (yeah, /M too)
  7.                                 (Note -v and -m are mutually exclusive!)
  8.                 filename        name of target zip file(s) (wildcards ok)
  9.                 [.ZIP]          optional file type (forced to .ZIP anyway)
  10.                 [member.typ]    optional ambiguous ZIP member name
  11.                                 (generalized wildcards ok)
  12.                 [>output]       optional output redirection (default:  CON:)
  13.  
  14. Results:
  15.  
  16.         In the default ('wide') mode, ZDIR outputs a 3-column listing of
  17.         the members of the target .ZIP file(s), to include compressed and
  18.         uncompressed file sizes (in Kb).  Short, sweet, to the point.
  19.  
  20.         If you include the -V verbose switch, ZDIR will output a more
  21.         detailed report (with one member file per line), and ZIP file
  22.         comments (if present).  ZIP member sizes and file count  will
  23.         be totalled and output, and the overall totals (for all ZIP
  24.         files processed if you designate more than one) will also be output.
  25.  
  26.         If you use -M instead, you'll get just one file per name,
  27.         complete with path et al., as stored in the Zip file. No sizes,
  28.         no dates; may be useful for piping into programmes. Beware of
  29.         the header lines and the Zip comment, though.
  30.  
  31.         If a member.typ pattern is used, possibly containing wildcards,
  32.         then only members matching that pattern are listed. The pattern
  33.         may be of the form 'a*b?c', meaning 'any string between a and b
  34.         is ok, but b and c must be present with exactly one character
  35.         between them'. (The way you always wanted DOS to behave but were
  36.         afraid to ask Bill Gates for.)
  37.  
  38.         C:>ZDIR A:*             will list contents of all .ZIP files
  39.                                 on drive A:
  40.         C:\SUBDIR\>zdir *       will list contents of all .ZIP files
  41.                                 in the current drive:\directory
  42.         C:\SUBDIR\>zdir f*      will list contents of all .ZIP files
  43.                                 starting with 'F' in the current drive:\
  44.                                 directory
  45.         C:\SUBDIR\>zdir f*.*    in addition, will try even those files
  46.                                 with a type other than '.ZIP'.
  47.         C:>ZDIR * *.asm         will look in all .ZIP files in current
  48.                                 drive:\directory, and list member files
  49.                                 that have an '.ASM' file type.
  50.         C:>ZDIR -v * *.asm      same thing, but verbose display
  51.         C:>ZDIR d:\foo\f* *.COM will look in all .ZIP files starting with
  52.                                 'F' in D:\FOO\, and list member files
  53.                                 whose names begin with 'C' and have a
  54.                                 '.COM' file type.
  55.         C:>ZDIR \asm\zdir17 zdir1?.asm
  56.                                 will look in ZDIR17.ZIP in \ASM\, and list
  57.                                 member files that start with 'ZDIR1',
  58.                                 then any single character, and file type
  59.                                 '.ASM'.
  60.         C:>ZDIR ..\zdir17 *o?.?
  61.                                 will look in ZDIR17.ZIP in the parent
  62.                                 directory, and list all files that have
  63.                                 an 'O' as their second-to-last character
  64.                                 and a type of length 1.
  65. Limitations:
  66.  
  67.         None reported.
  68.  
  69.  
  70. Notes:
  71.  
  72.         You'll notice ZDIR's display is more like the other file
  73.         compressors out there.  (I don't have legal problems with SEA
  74.         to worry about .. so WHAT if it resembles their ARC's display!)
  75.         I WANT the file name at screen left .. and am NOT concerned at
  76.         this time about extended file names .. so ZDIR's display is
  77.         NOT like PKZIP's.
  78.  
  79. Plans:  Add DIR-like functioning with compatible switches:
  80.  
  81.                 ZDIR            Produce a listing of the target .ZIP file
  82.                                 contents identical to a DIR listing.
  83.                                 Member dates, times, byte sizes (uncompressed).
  84.  
  85.                 ZDIR -W         Just like a DIR /W (wide) listing.  No sizes,
  86.                                 dates, etc.
  87.  
  88.         Eventually a "ls"-compatible utility, providing all the functionality
  89.         and switches of the Unix-compatible ls utility.
  90.  
  91.         Add ARC/PAK display capability as well as ZIP files.
  92.  
  93.         Contemplating a non-DOS output of the ZIP file comments
  94.         (to eliminate any chance of ANSI command sequences turning out
  95.         to be keyboard macros AKA viri).  However, then the comments
  96.         wouldn't go to StdOut anymore .. sigh ..
  97.  
  98. Credits:
  99.  
  100.         Compliments to the unknown author of ADIR.EXE (snarfed long ago from
  101.         who knows where, no source) for his wildcard functions.  (Though NO
  102.         thanks to him for not releasing the source.  It was buggy anyway.)
  103.         Watch this space for the upcoming release of an improved ADIR
  104.         (with assembly language source, of course).
  105.  
  106.         Thanks to PKWARE for the details on the ZIP directory structure.
  107.  
  108.         Thanks to Gunter Rademacher for the Fortran source of a non-recursive
  109.         generalized wildcard matcher.
  110.  
  111. Constraints:
  112.         None.  Released to the public domain.
  113.  
  114.         David P Kirschbaum
  115.         Toad Hall
  116.         kirsch@sesi.com
  117.  
  118. Significant version changes:
  119.  
  120. v1.8    Minor changes to match PKWARE's V2.07x.
  121.         - Added "Tokenized" and "Deflated" methods.
  122.         - Removed earlier version numbers from comments
  123.           and commented-out code (since it seems to work).
  124.         - To be done:  multi-volume :-)
  125.         - Contemplating conflicts with some newcomer whippersnapper
  126.           and his feelthy ZDIR directory shell.  Phthththththth.
  127.           We'll let *him* worry about it:  we were here first, ayup.
  128.         Toad Hall
  129.  
  130. v1.7    Another round from Bonn.  Ten thousand thanks to TapirSoft
  131.         and Gisbert W. Selke
  132.         - fixed a bug in ZIP file name parsing: wouldn't accept a parent
  133.           dir in path ('..\blah'), nor dirs including .TYPEs (WHO uses those??)
  134.         - leave .TYP of zip file alone if specified on command line; why force
  135.           it to ZIP?? (Assuming the user knows what she does.)
  136.         - David's complaint about missing file name expansion routines pitied
  137.           me; so here's neat parsing, and the way DOS always should have worked:
  138.           'a*d' will match 'ad' and 'abd' and 'abcd' but not 'a' or 'ab'...;
  139.           'a?d' will match 'abd' but not 'ad'. Side effect: 'foo*' will
  140.           match 'foo' and 'foo.bar' - period is just an ordinary char.
  141.           This applies to ZIP members only, not to ZIP file names! (Could
  142.           be done easily, though. Too lazy for now. See comments in Find_ZIP.)
  143.  
  144. v1.6b   Toad Hall again
  145.         - GWS's code immediately adopted (great ideas!).
  146.         - Removed old commented-out code (from v1.5, v1.6, v1.6a, etc.)
  147.         - Formal release from Toad Hall as v1.6b.
  148.  
  149. v1.6a   GWS (yeah, hacking away in West Germany's capital village)
  150.         strikes again
  151.         - Cleaning up verbose display:
  152.           Some columns were one off. Also, change name alignment slightly.
  153.         - Added /m ('monosyllabic') command line switch:
  154.           This will show full names, paths'n'all, as stored in the Zip,
  155.           one per line, and nothing else. May be nice for piping into
  156.           other programmes. - Beware of the header lines, though.
  157.  
  158. v1.6    - v1.4a Changes:
  159.           Gisbert Selke (all the way from Germany, I think) tweaked the
  160.           earlier v1.4 code.  (See the v1.4a comments).
  161.           I kept his changes (that I hadn't already added in v1.5 myself),
  162.           incorporating them into the v1.5 code.  (Of course, just HAD to tweak
  163.           his changes as well!)
  164.           Nice to see he didn't catch the bugs in v1.4!  Makes me feel
  165.           slightly less stupid.
  166.         - Member filenames:
  167.           In verbose output, I'm still considering shifting filenames to the
  168.           right hand side of the screen.  That would permit long (path)
  169.           filenames to be displayed/output (with screen wraparound handling
  170.           the weird, extra-long ones).  I believe that's why the PKZIP author
  171.           (Katz) formatted his display that way.  But the member names on the
  172.           right is NOT convenient to me!  Leaving it the original way (member
  173.           file names on the left).  Someday, when we decide to display
  174.           file paths as well as names, we'll probably have to do that.
  175.           (Or display paths separately on the right .. or whatever ..
  176.           Whaddya want, outside world?  Give me your opinions.)
  177.         - Considering parsing the ZIP file comments for ANSI command
  178.           sequences (to trap those viruses that try to reassign your
  179.           keyboard to delete your hard disk, etc., via a ZIP file
  180.           comment).  Not yet.
  181.  
  182. v1.4a   - TapirSoft Gisbert W.Selke: Allow '/' as switch char, for them
  183.           die-hard DOS people like myself. Display rrrrrreal 4-byte CRCs.
  184.           Add text for 'Imploded'.
  185.  
  186. v1.5    - Added the "implode" compression style to verbose display,
  187.           plus traps for unknown compression types.
  188.         - Added an "E" encryption flag to verbose display.
  189.         - Display shows a "+" (in verbose as well as nonverbose mode)
  190.           if member file names include paths.
  191.           (We are NOT displaying full paths yet.)
  192.         - Squashed some bugs.  (See .ASM for details)
  193.  
  194. v1.4    - Increased the offset (from ZIP file end) where ZDIR starts to
  195.           look for the ZIP central directory.  Seems some BBS's are adding
  196.           huge advertising billboards as comments.
  197.  
  198. v1.3c   - Never tested for no cmdline args at all, and the new args
  199.           command line parser went into never-never land!  Sloppy testing!
  200.           Fixed, and thanks to FAAR RBBS for alerting me.
  201.  
  202. v1.3b   - 1.3a broke member file testing.  Squashed the bugs (harder
  203.           this time) with completely rewritten command line parsing.
  204.           (Donno HOW it got past testing!)
  205.           Now you can put the '-v' verbose switch before or after
  206.           file names and wild cards.
  207.  
  208. 1.3a    - Bumped file end reading up to 256 bytes to insure we can handle
  209.           ZIP files that might have been padded (rounded up to 128 bytes)
  210.           by XMODEM and other unmannerly file transfer systems and utilities.
  211.         - Adding ZIP file comment display.
  212.  
  213. v1.3    - Adding '-v' verbose display via cmdline switch.  Code snarfed from
  214.           my hack at QBARCV.ASM (an ARC/PAK/ZIP lister for QuickBasic and
  215.           RBBS).
  216.  
  217. v1.2    - Replaced brute force (reading a 5Kb hunk of the file end into a
  218.           buffer and searching for central directory start) with a more
  219.           elegant solution: read in the end directory structure and find
  220.           the file pointers to the central directory there.
  221.  
  222. v1.1    - I forget.
  223.